import request from '@/config/axios'

export interface VosNumberVO {
  id: number
  locationId: number
  status: number
  number: string
}

// 查询号码池列表
export const getVosNumberPage = async (params) => {
  return await request.get({ url: `/call/vos-number/page`, params })
}

// 查询号码池详情
export const getVosNumber = async (id: number) => {
  return await request.get({ url: `/call/vos-number/get?id=` + id })
}

// 查询号码池列表
export const getVosNumberList = async () => {
  return await request.get({ url: `/call/vos-number/list` })
}

// 新增号码池
export const createVosNumber = async (data: VosNumberVO) => {
  return await request.post({ url: `/call/vos-number/create`, data })
}

// 修改号码池
export const updateVosNumber = async (data: VosNumberVO) => {
  return await request.put({ url: `/call/vos-number/update`, data })
}

// 删除号码池
export const deleteVosNumber = async (id: number) => {
  return await request.delete({ url: `/call/vos-number/delete?id=` + id })
}

// 删除号码池
export const getVosNumberCount = async () => {
  return await request.get({ url: `/call/vos-number/get-number-count` })
}
